﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Joyintech.BLL.inpiao365;
using Joyintech.Model.inpiao365;

namespace Joyintech.Web.inpiao365.UserCenter
{
    public partial class MyTicket_OrderSorts : System.Web.UI.Page
    {
        private order_BLL orderBll = null;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                BindOrderList();
            }
        }

        /// <summary>
        /// 绑定限时处理的订单列表数据
        /// </summary>
        protected void BindOrderList()
        {
            orderBll = new order_BLL();
            customer currentCustomer = customer_BLL.GetInstance().GetCurrentCustomer();
            int currentPage = int.Parse(Request["currentpage"]);
            DataSet orderlist = orderBll.GetAllOrderList(currentCustomer.CustomerId, currentPage);
            int RCount = orderBll.RecordCount(currentCustomer.CustomerId.ToString());
            RecordCount.Value = RCount.ToString();
            if (orderlist != null && orderlist.Tables.Count > 0)
            {
                allorders.DataSource = orderlist.Tables[0];
                allorders.DataBind();
            }
        }

        private DataTable ChangeDs(DataTable dt)
        {
            DataRow dr = dt.NewRow();
            DataColumn youxiao = new DataColumn("youxiao");
            DataColumn xianshizhifu = new DataColumn("xianshizhifu");
            
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DateTime ordertime = DateTime.Parse(dt.Rows[i]["OrderTime"].ToString());
                //xianshizhifu = ordertime.AddMinutes(15).ToString();
            }
            return null;
        }
    }
}